package com.string_;

/**
 * @Author 小闽
 * @Date 2024/9/29 16:58
 * @PackageName: com.string
 * @ClassName: StringExercise04
 * @Description: 字符串对象练习04
 * @Version 1.0
 */
public class StringExercise04 {
    public static void main(String[] args) {
        String s1 = "苏宁易购";
        String s2 = "java";
        String s4 = "java";
        String s3 = new String("java");
        System.out.println(s2 == s3); // false
        System.out.println(s2 == s4); // true
        System.out.println(s2.equals(s3)); // true
        System.out.println(s1 == s2); // false

    }
}
